//
// Created by wze-zero on 2024/8/25 025.
//
#include <iostream>

using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    cout << b + (b - a) << endl;
    return 0;
}